<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: util.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00260_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">util.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00260.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a03620.html">precomp.h</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#pragma hdrstop</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="a00260.html#a9c4051843495a2b470f53526cfe569f1">   21</a></span>&#160;BOOL <a class="code" href="a00260.html#a9c4051843495a2b470f53526cfe569f1">AddLink</a>(</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<a class="code" href="a01845.html">PCONV_INFO</a> pcoi,</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<a class="code" href="a00086.html#a94c133ba2c05e4193dd481f6ac11b2ed">GATOM</a> gaItem,</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;WORD wFmt,</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;WORD wType)</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;{</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <a class="code" href="a01825.html">PADVISE_LINK</a> aLinkNew;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordtype">int</span> cLinks;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <a class="code" href="a00086.html#afb884b9e2fb48a9b845acffcb306c059">LATOM</a> la;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <a class="code" href="a01841.html">PCL_INSTANCE_INFO</a> pcii;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">     * if the link already exists, update its flags, otherwise create a</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">     * new one.</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    aLinkNew = pcoi-&gt;<a class="code" href="a01845.html#abd6ddc0ca811ba45f97e1052e24c92f7">aLinks</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    cLinks = pcoi-&gt;<a class="code" href="a01845.html#abb1c8670b152a59cef661dba09b0d09a">cLinks</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    la = <a class="code" href="a00086.html#a74f36efd1711016cbf41427811c2edea">GlobalToLocalAtom</a>(gaItem);     <span class="comment">// aLinkNew copy</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">while</span> (cLinks) {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordflow">if</span> (aLinkNew-&gt;<a class="code" href="a01825.html#a491330cc2632c738dbfac1d6393eedb6">laItem</a> == la &amp;&amp; aLinkNew-&gt;<a class="code" href="a01825.html#ac6ac629d505432bedeb5cb3b7123ac98">wFmt</a> == wFmt) {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            aLinkNew-&gt;<a class="code" href="a01825.html#aedf49a5424d4d9ad2cf1817a726c165f">wType</a> = wType;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            aLinkNew-&gt;<a class="code" href="a01825.html#a5d717a64978f34c9afb8ae23374160a0">state</a> = 0;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            DeleteAtom(la);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        }</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        aLinkNew++;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        cLinks--;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordflow">if</span> (pcoi-&gt;<a class="code" href="a01845.html#abd6ddc0ca811ba45f97e1052e24c92f7">aLinks</a> == NULL) {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        aLinkNew = (<a class="code" href="a00086.html#a164117241c775958fe49a399fda44d81">PADVISE_LINK</a>)<a class="code" href="a00086.html#acc904eaf46cb98fa7741658d8e00f06c">DDEMLAlloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="a01825.html">ADVISE_LINK</a>));</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        aLinkNew = (<a class="code" href="a00086.html#a164117241c775958fe49a399fda44d81">PADVISE_LINK</a>)<a class="code" href="a00086.html#ac22685a19cc50d86b3c1ab6cf0fa322a">DDEMLReAlloc</a>(pcoi-&gt;<a class="code" href="a01845.html#abd6ddc0ca811ba45f97e1052e24c92f7">aLinks</a>,</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                <span class="keyword">sizeof</span>(<a class="code" href="a01825.html">ADVISE_LINK</a>) * (pcoi-&gt;<a class="code" href="a01845.html#abb1c8670b152a59cef661dba09b0d09a">cLinks</a> + 1));</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordflow">if</span> (aLinkNew == NULL) {</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="a00086.html#a8b2e79f5b5173a6fbfeb65e2195720c3">SetLastDDEMLError</a>(pcoi-&gt;<a class="code" href="a01845.html#ac54e3b685e73c03228d890f651895a84">pcii</a>, DMLERR_MEMORY_ERROR);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        DeleteAtom(la);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    pcoi-&gt;<a class="code" href="a01845.html#abd6ddc0ca811ba45f97e1052e24c92f7">aLinks</a> = aLinkNew;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    aLinkNew += pcoi-&gt;<a class="code" href="a01845.html#abb1c8670b152a59cef661dba09b0d09a">cLinks</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    pcoi-&gt;<a class="code" href="a01845.html#abb1c8670b152a59cef661dba09b0d09a">cLinks</a>++;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    aLinkNew-&gt;<a class="code" href="a01825.html#a491330cc2632c738dbfac1d6393eedb6">laItem</a> = la;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    aLinkNew-&gt;<a class="code" href="a01825.html#ac6ac629d505432bedeb5cb3b7123ac98">wFmt</a> = wFmt;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    aLinkNew-&gt;<a class="code" href="a01825.html#aedf49a5424d4d9ad2cf1817a726c165f">wType</a> = wType;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    aLinkNew-&gt;<a class="code" href="a01825.html#a5d717a64978f34c9afb8ae23374160a0">state</a> = 0;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">if</span> (!(pcoi-&gt;<a class="code" href="a01845.html#a5d717a64978f34c9afb8ae23374160a0">state</a> &amp; ST_CLIENT)) {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment">         * Add count for this link</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        pcii = pcoi-&gt;<a class="code" href="a01845.html#ac54e3b685e73c03228d890f651895a84">pcii</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">for</span> (aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a> = pcii-&gt;<a class="code" href="a01841.html#a7f12cb41f151ba20c6052876aa458d00">pLinkCount</a>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                    aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a> = aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">next</a>) {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keywordflow">if</span> (aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#a037642095df06ec39ad1a904cc1f7c30">laTopic</a> == pcoi-&gt;<a class="code" href="a01845.html#a037642095df06ec39ad1a904cc1f7c30">laTopic</a> &amp;&amp;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                    aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#ad0b56899c2df27096898ccce24547723">gaItem</a> == gaItem &amp;&amp;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                    aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#ac6ac629d505432bedeb5cb3b7123ac98">wFmt</a> == wFmt) {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#a23a1038dcd2d6049ff910addc32d4934">Total</a>++;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keywordflow">return</span>(TRUE);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="comment">         * Not found - add an entry</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a> = (<a class="code" href="a00086.html#af4a03bdfd52bf4dc914f4a23dbbf906e">PLINK_COUNT</a>)<a class="code" href="a00086.html#acc904eaf46cb98fa7741658d8e00f06c">DDEMLAlloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="a01837.html">LINK_COUNT</a>));</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keywordflow">if</span> (aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a> == NULL) {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <a class="code" href="a00086.html#a8b2e79f5b5173a6fbfeb65e2195720c3">SetLastDDEMLError</a>(pcoi-&gt;<a class="code" href="a01845.html#ac54e3b685e73c03228d890f651895a84">pcii</a>, DMLERR_MEMORY_ERROR);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">next</a> = pcii-&gt;<a class="code" href="a01841.html#a7f12cb41f151ba20c6052876aa458d00">pLinkCount</a>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        pcii-&gt;<a class="code" href="a01841.html#a7f12cb41f151ba20c6052876aa458d00">pLinkCount</a> = aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#a037642095df06ec39ad1a904cc1f7c30">laTopic</a> = <a class="code" href="a00086.html#ad33b600c0405aee1e67d56ddd3e83c42">IncLocalAtomCount</a>(pcoi-&gt;<a class="code" href="a01845.html#a037642095df06ec39ad1a904cc1f7c30">laTopic</a>); <span class="comment">// LinkCount copy</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#ad0b56899c2df27096898ccce24547723">gaItem</a> = <a class="code" href="a00086.html#a763cdcfe7e86c87e6bd2b6e0d527766c">IncGlobalAtomCount</a>(gaItem); <span class="comment">// LinkCount copy</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#a491330cc2632c738dbfac1d6393eedb6">laItem</a> = <a class="code" href="a00086.html#ad33b600c0405aee1e67d56ddd3e83c42">IncLocalAtomCount</a>(la); <span class="comment">// LinkCount copy</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#ac6ac629d505432bedeb5cb3b7123ac98">wFmt</a> = wFmt;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        aLinkNew-&gt;<a class="code" href="a01825.html#ada696c68d610d9735c5f59302d2955ae">pLinkCount</a>-&gt;<a class="code" href="a01837.html#a23a1038dcd2d6049ff910addc32d4934">Total</a> = 1;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="comment">// doesn&#39;t matter: aLinkNew-&gt;pLinkCount-&gt;Count = 0;</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;}</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="comment"> * The LinkCount array is a list of all active links grouped by topic</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="comment"> * and item.  The Total field is the number of active links total for</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="comment"> * that particular topic/item pair for the entire instance.  The count</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="comment"> * field is used to properly set up the links to go field of the XTYP_ADVREQ</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="comment"> * callback.  Whenever links are added or removed, DeleteLinkCount or</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment"> * AddLink need to be called to keep thses counts correct.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="a00260.html#a21a58dc05e3852357f94fda6251ceef6">  121</a></span>&#160;VOID <a class="code" href="a00260.html#a21a58dc05e3852357f94fda6251ceef6">DeleteLinkCount</a>(</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<a class="code" href="a01841.html">PCL_INSTANCE_INFO</a> pcii,</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<a class="code" href="a01837.html">PLINK_COUNT</a> pLinkCountDelete)</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;{</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <a class="code" href="a01837.html">PLINK_COUNT</a> pLinkCount, pLinkCountPrev;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">if</span> (--pLinkCountDelete-&gt;<a class="code" href="a01837.html#a23a1038dcd2d6049ff910addc32d4934">Total</a> != 0) {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    pLinkCountPrev = NULL;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    pLinkCount     = pcii-&gt;<a class="code" href="a01841.html#a7f12cb41f151ba20c6052876aa458d00">pLinkCount</a>;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">while</span> (pLinkCount) {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keywordflow">if</span> (pLinkCount == pLinkCountDelete) {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            GlobalDeleteAtom(pLinkCount-&gt;<a class="code" href="a01837.html#ad0b56899c2df27096898ccce24547723">gaItem</a>);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            DeleteAtom(pLinkCount-&gt;<a class="code" href="a01837.html#a491330cc2632c738dbfac1d6393eedb6">laItem</a>);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            DeleteAtom(pLinkCount-&gt;<a class="code" href="a01837.html#a037642095df06ec39ad1a904cc1f7c30">laTopic</a>);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <span class="keywordflow">if</span> (pLinkCountPrev == NULL) {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                pcii-&gt;<a class="code" href="a01841.html#a7f12cb41f151ba20c6052876aa458d00">pLinkCount</a> = pLinkCount-&gt;<a class="code" href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">next</a>;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;                pLinkCountPrev-&gt;<a class="code" href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">next</a> = pLinkCount-&gt;<a class="code" href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">next</a>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            }</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            <a class="code" href="a00086.html#a14b7b2abd485b184293dcd3d34c29e23">DDEMLFree</a>(pLinkCount);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        pLinkCountPrev = pLinkCount;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        pLinkCount = pLinkCount-&gt;<a class="code" href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">next</a>;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    }</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa01825_html_a491330cc2632c738dbfac1d6393eedb6"><div class="ttname"><a href="a01825.html#a491330cc2632c738dbfac1d6393eedb6">tagADVISE_LINK::laItem</a></div><div class="ttdeci">LATOM laItem</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00139">ddemlcli.h:139</a></div></div>
<div class="ttc" id="aa01845_html_ac54e3b685e73c03228d890f651895a84"><div class="ttname"><a href="a01845.html#ac54e3b685e73c03228d890f651895a84">tagCONV_INFO::pcii</a></div><div class="ttdeci">PCL_INSTANCE_INFO pcii</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00204">ddemlcli.h:204</a></div></div>
<div class="ttc" id="aa01837_html_a037642095df06ec39ad1a904cc1f7c30"><div class="ttname"><a href="a01837.html#a037642095df06ec39ad1a904cc1f7c30">tagLINK_COUNT::laTopic</a></div><div class="ttdeci">LATOM laTopic</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00167">ddemlcli.h:167</a></div></div>
<div class="ttc" id="aa00086_html_a164117241c775958fe49a399fda44d81"><div class="ttname"><a href="a00086.html#a164117241c775958fe49a399fda44d81">PADVISE_LINK</a></div><div class="ttdeci">struct tagADVISE_LINK * PADVISE_LINK</div></div>
<div class="ttc" id="aa01845_html_abb1c8670b152a59cef661dba09b0d09a"><div class="ttname"><a href="a01845.html#abb1c8670b152a59cef661dba09b0d09a">tagCONV_INFO::cLinks</a></div><div class="ttdeci">int cLinks</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00218">ddemlcli.h:218</a></div></div>
<div class="ttc" id="aa00086_html_a74f36efd1711016cbf41427811c2edea"><div class="ttname"><a href="a00086.html#a74f36efd1711016cbf41427811c2edea">GlobalToLocalAtom</a></div><div class="ttdeci">LATOM GlobalToLocalAtom(GATOM ga)</div><div class="ttdef"><b>Definition:</b> <a href="a00164_source.html#l00464">hsz.c:464</a></div></div>
<div class="ttc" id="aa00086_html_acc904eaf46cb98fa7741658d8e00f06c"><div class="ttname"><a href="a00086.html#acc904eaf46cb98fa7741658d8e00f06c">DDEMLAlloc</a></div><div class="ttdeci">#define DDEMLAlloc(cb)</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00012">ddemlcli.h:12</a></div></div>
<div class="ttc" id="aa01837_html"><div class="ttname"><a href="a01837.html">tagLINK_COUNT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00165">ddemlcli.h:165</a></div></div>
<div class="ttc" id="aa00086_html_a14b7b2abd485b184293dcd3d34c29e23"><div class="ttname"><a href="a00086.html#a14b7b2abd485b184293dcd3d34c29e23">DDEMLFree</a></div><div class="ttdeci">#define DDEMLFree(p)</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00014">ddemlcli.h:14</a></div></div>
<div class="ttc" id="aa00086_html_a8b2e79f5b5173a6fbfeb65e2195720c3"><div class="ttname"><a href="a00086.html#a8b2e79f5b5173a6fbfeb65e2195720c3">SetLastDDEMLError</a></div><div class="ttdeci">VOID SetLastDDEMLError(PCL_INSTANCE_INFO pcii, DWORD error)</div><div class="ttdef"><b>Definition:</b> <a href="a00170_source.html#l00137">instance.c:137</a></div></div>
<div class="ttc" id="aa00260_html_a21a58dc05e3852357f94fda6251ceef6"><div class="ttname"><a href="a00260.html#a21a58dc05e3852357f94fda6251ceef6">DeleteLinkCount</a></div><div class="ttdeci">VOID DeleteLinkCount(PCL_INSTANCE_INFO pcii, PLINK_COUNT pLinkCountDelete)</div><div class="ttdef"><b>Definition:</b> <a href="a00260_source.html#l00121">util.c:121</a></div></div>
<div class="ttc" id="aa01837_html_ad0b56899c2df27096898ccce24547723"><div class="ttname"><a href="a01837.html#ad0b56899c2df27096898ccce24547723">tagLINK_COUNT::gaItem</a></div><div class="ttdeci">GATOM gaItem</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00168">ddemlcli.h:168</a></div></div>
<div class="ttc" id="aa01837_html_a491330cc2632c738dbfac1d6393eedb6"><div class="ttname"><a href="a01837.html#a491330cc2632c738dbfac1d6393eedb6">tagLINK_COUNT::laItem</a></div><div class="ttdeci">LATOM laItem</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00169">ddemlcli.h:169</a></div></div>
<div class="ttc" id="aa01845_html"><div class="ttname"><a href="a01845.html">tagCONV_INFO</a></div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00202">ddemlcli.h:202</a></div></div>
<div class="ttc" id="aa00086_html_a94c133ba2c05e4193dd481f6ac11b2ed"><div class="ttname"><a href="a00086.html#a94c133ba2c05e4193dd481f6ac11b2ed">GATOM</a></div><div class="ttdeci">ATOM GATOM</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00019">ddemlcli.h:19</a></div></div>
<div class="ttc" id="aa00086_html_a763cdcfe7e86c87e6bd2b6e0d527766c"><div class="ttname"><a href="a00086.html#a763cdcfe7e86c87e6bd2b6e0d527766c">IncGlobalAtomCount</a></div><div class="ttdeci">GATOM IncGlobalAtomCount(GATOM la)</div><div class="ttdef"><b>Definition:</b> <a href="a00164_source.html#l00490">hsz.c:490</a></div></div>
<div class="ttc" id="aa01837_html_ac6ac629d505432bedeb5cb3b7123ac98"><div class="ttname"><a href="a01837.html#ac6ac629d505432bedeb5cb3b7123ac98">tagLINK_COUNT::wFmt</a></div><div class="ttdeci">WORD wFmt</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00170">ddemlcli.h:170</a></div></div>
<div class="ttc" id="aa01841_html_a7f12cb41f151ba20c6052876aa458d00"><div class="ttname"><a href="a01841.html#a7f12cb41f151ba20c6052876aa458d00">tagCL_INSTANCE_INFO::pLinkCount</a></div><div class="ttdeci">PLINK_COUNT pLinkCount</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00194">ddemlcli.h:194</a></div></div>
<div class="ttc" id="aa01837_html_abaf3237b7c439f6952526fe04044ee9e"><div class="ttname"><a href="a01837.html#abaf3237b7c439f6952526fe04044ee9e">tagLINK_COUNT::next</a></div><div class="ttdeci">struct tagLINK_COUNT * next</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00166">ddemlcli.h:166</a></div></div>
<div class="ttc" id="aa01825_html"><div class="ttname"><a href="a01825.html">tagADVISE_LINK</a></div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00137">ddemlcli.h:137</a></div></div>
<div class="ttc" id="aa01825_html_ada696c68d610d9735c5f59302d2955ae"><div class="ttname"><a href="a01825.html#ada696c68d610d9735c5f59302d2955ae">tagADVISE_LINK::pLinkCount</a></div><div class="ttdeci">struct tagLINK_COUNT * pLinkCount</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00138">ddemlcli.h:138</a></div></div>
<div class="ttc" id="aa01837_html_a23a1038dcd2d6049ff910addc32d4934"><div class="ttname"><a href="a01837.html#a23a1038dcd2d6049ff910addc32d4934">tagLINK_COUNT::Total</a></div><div class="ttdeci">short Total</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00171">ddemlcli.h:171</a></div></div>
<div class="ttc" id="aa00086_html_afb884b9e2fb48a9b845acffcb306c059"><div class="ttname"><a href="a00086.html#afb884b9e2fb48a9b845acffcb306c059">LATOM</a></div><div class="ttdeci">ATOM LATOM</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00018">ddemlcli.h:18</a></div></div>
<div class="ttc" id="aa01845_html_a5d717a64978f34c9afb8ae23374160a0"><div class="ttname"><a href="a01845.html#a5d717a64978f34c9afb8ae23374160a0">tagCONV_INFO::state</a></div><div class="ttdeci">WORD state</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00211">ddemlcli.h:211</a></div></div>
<div class="ttc" id="aa01825_html_a5d717a64978f34c9afb8ae23374160a0"><div class="ttname"><a href="a01825.html#a5d717a64978f34c9afb8ae23374160a0">tagADVISE_LINK::state</a></div><div class="ttdeci">WORD state</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00142">ddemlcli.h:142</a></div></div>
<div class="ttc" id="aa00260_html_a9c4051843495a2b470f53526cfe569f1"><div class="ttname"><a href="a00260.html#a9c4051843495a2b470f53526cfe569f1">AddLink</a></div><div class="ttdeci">BOOL AddLink(PCONV_INFO pcoi, GATOM gaItem, WORD wFmt, WORD wType)</div><div class="ttdef"><b>Definition:</b> <a href="a00260_source.html#l00021">util.c:21</a></div></div>
<div class="ttc" id="aa01825_html_aedf49a5424d4d9ad2cf1817a726c165f"><div class="ttname"><a href="a01825.html#aedf49a5424d4d9ad2cf1817a726c165f">tagADVISE_LINK::wType</a></div><div class="ttdeci">WORD wType</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00141">ddemlcli.h:141</a></div></div>
<div class="ttc" id="aa00086_html_ad33b600c0405aee1e67d56ddd3e83c42"><div class="ttname"><a href="a00086.html#ad33b600c0405aee1e67d56ddd3e83c42">IncLocalAtomCount</a></div><div class="ttdeci">LATOM IncLocalAtomCount(LATOM la)</div><div class="ttdef"><b>Definition:</b> <a href="a00164_source.html#l00516">hsz.c:516</a></div></div>
<div class="ttc" id="aa01825_html_ac6ac629d505432bedeb5cb3b7123ac98"><div class="ttname"><a href="a01825.html#ac6ac629d505432bedeb5cb3b7123ac98">tagADVISE_LINK::wFmt</a></div><div class="ttdeci">WORD wFmt</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00140">ddemlcli.h:140</a></div></div>
<div class="ttc" id="aa03620_html"><div class="ttname"><a href="a03620.html">precomp.h</a></div></div>
<div class="ttc" id="aa01845_html_a037642095df06ec39ad1a904cc1f7c30"><div class="ttname"><a href="a01845.html#a037642095df06ec39ad1a904cc1f7c30">tagCONV_INFO::laTopic</a></div><div class="ttdeci">LATOM laTopic</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00208">ddemlcli.h:208</a></div></div>
<div class="ttc" id="aa00086_html_ac22685a19cc50d86b3c1ab6cf0fa322a"><div class="ttname"><a href="a00086.html#ac22685a19cc50d86b3c1ab6cf0fa322a">DDEMLReAlloc</a></div><div class="ttdeci">#define DDEMLReAlloc(p, cb)</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00013">ddemlcli.h:13</a></div></div>
<div class="ttc" id="aa01845_html_abd6ddc0ca811ba45f97e1052e24c92f7"><div class="ttname"><a href="a01845.html#abd6ddc0ca811ba45f97e1052e24c92f7">tagCONV_INFO::aLinks</a></div><div class="ttdeci">PADVISE_LINK aLinks</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00217">ddemlcli.h:217</a></div></div>
<div class="ttc" id="aa00086_html_af4a03bdfd52bf4dc914f4a23dbbf906e"><div class="ttname"><a href="a00086.html#af4a03bdfd52bf4dc914f4a23dbbf906e">PLINK_COUNT</a></div><div class="ttdeci">struct tagLINK_COUNT * PLINK_COUNT</div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00136">ddemlcli.h:136</a></div></div>
<div class="ttc" id="aa01841_html"><div class="ttname"><a href="a01841.html">tagCL_INSTANCE_INFO</a></div><div class="ttdef"><b>Definition:</b> <a href="a00086_source.html#l00175">ddemlcli.h:175</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00260.html">util.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
